// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity.p_view;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.*;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.RelativeLayout;

// Referenced classes of package com.nnee.p_pr.p_activity.view:
//            bq

public class cls_RelativeLayoutEx extends RelativeLayout
{

    public cls_RelativeLayoutEx(Context context)
    {
        this(context, null, 0);
    }

    public cls_RelativeLayoutEx(Context context, AttributeSet attributeset)
    {
        this(context, null, 0);
    }

    public cls_RelativeLayoutEx(Context context, AttributeSet attributeset, int i1)
    {
        super(context, attributeset, i1);
        e = 0;
        f = 0;
        g = false;
        i = new Rect();
        j = new bq(this);
        o = false;
    }

    private void a()
    {
        Drawable drawable = getBackground();
        if(drawable != null)
        {
            h = drawable;
            k = getPaddingLeft();
            l = getPaddingTop();
            m = getPaddingRight();
            n = getPaddingBottom();
        } else
        {
            h = getResources().getDrawable(0x7f020085);
            h.getPadding(i);
            k = i.left;
            l = i.top;
            m = i.right;
            n = i.bottom;
        }
        h.setBounds(getLeft() + getScrollX(), getTop() + getScrollY(), getRight() + getScrollX(), getBottom() + getScrollY());
    }

    private void a(Canvas canvas, Bitmap bitmap)
    {
        if(canvas != null && bitmap != null)
            canvas.drawBitmap(bitmap, 20F, 20F, null);
    }

    public void a(int i1)
    {
        if(b == null)
        {
            b = getResources().getDrawable(i1);
            b.setCallback(j);
            if(b.isStateful())
                b.setState(getDrawableState());
            Drawable drawable = b;
            boolean flag;
            if(getVisibility() == 0)
                flag = true;
            else
                flag = false;
            drawable.setVisible(flag, false);
        }
    }

    public void a(Bitmap bitmap)
    {
        d = bitmap;
    }

    public void a(boolean flag)
    {
        c = flag;
    }

    protected void dispatchDraw(Canvas canvas)
    {
        if(h == null)
            a();
        h.draw(canvas);
        int i1 = canvas.save();
        canvas.clipRect(k, l, getWidth() - m, getBottom() - n);
        super.dispatchDraw(canvas);
        canvas.restoreToCount(i1);
        if(d != null)
            if(!c);
        break MISSING_BLOCK_LABEL_79;
        if(b != null && g)
        {
            g = false;
            if(!o)
            {
                b.setBounds(getLeft() + getScrollX(), getTop() + getScrollY(), getRight() + getScrollX(), getBottom() + getScrollY());
                o = true;
            }
            b.draw(canvas);
        }
        return;
    }

    protected void drawableStateChanged()
    {
        super.drawableStateChanged();
        g = true;
        if(b != null && b.isStateful())
            b.setState(getDrawableState());
    }

    private static final String a = "RelativeLayoutEx";
    private Drawable b;
    private boolean c;
    private Bitmap d;
    private int e;
    private int f;
    private boolean g;
    private Drawable h;
    private Rect i;
    private android.graphics.drawable.Drawable.Callback j;
    private int k;
    private int l;
    private int m;
    private int n;
    private boolean o;
}
